//
//  OwnerIntegralViewController.m
//  GoodWayClient
//
//  Created by newhuidong on 16/1/4.
//  Copyright © 2016年 HuiDong. All rights reserved.
//

#import "OwnerIntegralViewController.h"
#import "OwnerIntegralTableViewCell.h"
@interface OwnerIntegralViewController ()
@property(nonatomic,strong)NSArray * array;
@property(nonatomic,strong)NSMutableArray * mutableArray;


@end

@implementation OwnerIntegralViewController

- (void)viewDidLoad {
    [super viewDidLoad];
    self.title=@"积分金额";
    // Uncomment the following line to preserve selection between presentations.
    // self.clearsSelectionOnViewWillAppear = NO;
    
    // Uncomment the following line to display an Edit button in the navigation bar for this view controller.
    // self.navigationItem.rightBarButtonItem = self.editButtonItem;
}

-(NSArray*)array{
    if (!_array) {
        
        _array = @[@{@"buy":@"购买除碳服务",@"jifen":@"获得2000积分",@"time":@"2015.11.18"},@{@"buy":@"购买除碳服务",@"jifen":@"获得2000积分",@"time":@"2015.11.18"},@{@"buy":@"购买除碳服务",@"jifen":@"获得2000积分",@"time":@"2015.11.18"},@{@"buy":@"购买除碳服务",@"jifen":@"获得2000积分",@"time":@"2015.11.18"}];
        
    }
    
    return _array;
    
    
}
-(NSMutableArray *)mutableArray{
    
    if (!_mutableArray) {
        
        _mutableArray=[NSMutableArray arrayWithArray:self.array];
    }
    return _mutableArray;
    
}

#pragma mark - Table view data source

- (NSInteger)numberOfSectionsInTableView:(UITableView *)tableView {
    return 1;
}

- (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section {
    return self.mutableArray.count;
}


- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath {
    
    OwnerIntegralTableViewCell *cell=[OwnerIntegralTableViewCell OwnerIntegralWithTableView :tableView];
    
    cell.dic=self.mutableArray[indexPath.row];
    return cell;
}
-(CGFloat)tableView:(UITableView *)tableView heightForRowAtIndexPath:(NSIndexPath *)indexPath{
    
    return 65;
}


@end
